﻿@model AutomatedTestDataManagement.Models.TestSuiteScenario

@{
    ViewBag.Title = "Delete";

}

<h2>Delete</h2>

<h3>Are you sure you want to delete @Model.TestScenario.ScenarioName from @Model.TestSuite.SuiteName?</h3>
<fieldset>
    <legend>TestSuiteScenario</legend>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.TestSuite.SuiteName)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.TestSuite.SuiteName)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.TestScenario.ScenarioName)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.TestScenario.ScenarioName)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.ScenarioNumber)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ScenarioNumber)
    </div>
</fieldset>
@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    <p>
        @if (ViewBag.SuiteID != null)
        {
            <input type ="hidden" id="SuiteID" name="SuiteID" value="@ViewBag.SuiteID" />
        }
        @if (ViewBag.ScenarioID != null)
        {
            <input type="hidden" id="ScenarioID" name="ScenarioID" value="@ViewBag.ScenarioID" />
        }
        <input type="hidden" name="ReturnToAction" id="ReturnToAction" value="@ViewBag.ReturnToAction" />
        <input type="submit" value="Delete" /> |
        @if (ViewBag.SuiteID != null)
        {
            if(ViewBag.ReturnToAction == "Edit")
            {
                @Html.ActionLink("Return to Test Suite", "Edit", "TestSuite", new { id = ViewBag.SuiteID }, null)
            }
            else
            {
                @Html.ActionLink("Return to Test Suite", "Delete", "TestSuite", new { id = ViewBag.SuiteID }, null)
            }
        }
        else
        {
            if (ViewBag.ScenarioID != null)
            {
                if (ViewBag.ReturnToAction == "Edit")
                {
                    @Html.ActionLink("Return to Test Scenario", "Edit", "TestScenario", new { id = ViewBag.ScenarioID }, null)
                }
                else
                {
                    @Html.ActionLink("Return to Test Scenario", "Delete", "TestScenario", new { id = ViewBag.ScenarioID }, null)
                }
            }
    @Html.Partial("_TestSuiteNav")
        }
    </p>
}
